package com.ag.bean;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TbKownledge entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TB_KOWNLEDGE", schema = "dbo", catalog = "AGDB")
public class TbKownledge implements java.io.Serializable {

	// Fields

	private String KId;
	private String KContext;
	private String a;
	private String b;
	private String c;
	private Set<TbKeyword> tbKeywords = new HashSet<TbKeyword>(0);

	// Constructors

	/** default constructor */
	public TbKownledge() {
	}

	/** minimal constructor */
	public TbKownledge(String KId, String KContext) {
		this.KId = KId;
		this.KContext = KContext;
	}

	/** full constructor */
	public TbKownledge(String KId, String KContext, String a, String b,
			String c, Set<TbKeyword> tbKeywords) {
		this.KId = KId;
		this.KContext = KContext;
		this.a = a;
		this.b = b;
		this.c = c;
		this.tbKeywords = tbKeywords;
	}

	// Property accessors
	@Id
	@Column(name = "K_ID", unique = true, nullable = false, length = 10)
	public String getKId() {
		return this.KId;
	}

	public void setKId(String KId) {
		this.KId = KId;
	}

	@Column(name = "K_CONTEXT", nullable = false, length = 1024)
	public String getKContext() {
		return this.KContext;
	}

	public void setKContext(String KContext) {
		this.KContext = KContext;
	}

	@Column(name = "A", length = 60)
	public String getA() {
		return this.a;
	}

	public void setA(String a) {
		this.a = a;
	}

	@Column(name = "B", length = 60)
	public String getB() {
		return this.b;
	}

	public void setB(String b) {
		this.b = b;
	}

	@Column(name = "C", length = 60)
	public String getC() {
		return this.c;
	}

	public void setC(String c) {
		this.c = c;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbKownledge")
	public Set<TbKeyword> getTbKeywords() {
		return this.tbKeywords;
	}

	public void setTbKeywords(Set<TbKeyword> tbKeywords) {
		this.tbKeywords = tbKeywords;
	}

}